from transformers import AutoModel, AutoTokenizer
import os
os.environ["HF_ENDPOINT"] = "https://hf-mirror.com"

model_name = "gguf-model.bin"
cache_dir = r"C:\Users\15513\PycharmProjects"

model = AutoModel.from_pretrained(model_name, cache_dir=cache_dir)
tokenizer = AutoTokenizer.from_pretrained(model_name, cache_dir=cache_dir)
print("模型下载完成！")

